﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DataFlowReport_Special.aspx.cs" Inherits="MLY.Reports.ChartReports.DataFlowReport_Special" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register Assembly="System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI.DataVisualization.Charting" TagPrefix="asp" %>    

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title><asp:Literal ID="TitleLiteral" runat="server" Text="<%$Dict:DataFlowReport.Title %>"></asp:Literal></title>
    <link href="../../Style/General_Style_v9.css" rel="stylesheet" type="text/css" />
    <link href="../../Style/ReportsStylesheet.css" rel="stylesheet" type="text/css" />   
    
   <%-- <script language="javascript" type="text/javascript">
        function OpenSecondPeriod() {
            document.getElementById("dates2Group1").style.display = 'block';
            document.getElementById("dates2Group2").style.display = 'block';
            document.getElementById("dates2Group3").style.display = 'block';
            document.getElementById("dates2Group4").style.display = 'block';
            document.getElementById("seconddatesopener").style.display = 'none';
        }
    </script>--%>
</head>
<body>
    <form id="form1" runat="server">
<div class="InerTextStyle">
    <asp:ToolkitScriptManager ID="ScriptManager1" runat="server"></asp:ToolkitScriptManager>
    <asp:Panel ID="DirectionPanel" runat="server">
    <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
    <ContentTemplate>
        <asp:Label ID="PageTitleLabel" runat="server" Text="<%$Dict:DataFlowReport.Title %>" CssClass="TitleStyle"></asp:Label>
        <br /><br />
        <table cellpadding="5" cellspacing="0">
        <tr>
        <td>
            <asp:Label ID="DateStringTitleLabel" runat="server" Text='<%$Dict:advancedRptPrams.chooseDateFilter: %>'></asp:Label>
        </td>
        <td colspan="3">
            <asp:DropDownList runat="server" ID="DateTypeDDL">
                <asp:ListItem Text="<%$Dict:clientAddWo.SendDate %>" Value="1" Selected="True"></asp:ListItem>
                <asp:ListItem Text="<%$Dict:clientAddWo.PlannedDelivaryDate %>" Value="2"></asp:ListItem>                        
                <asp:ListItem Text="<%$Dict:clientAddWo.DateFieldB %>" Value="3"></asp:ListItem>                   
                <asp:ListItem Text="<%$Dict:clientAddWo.ActualDelivaryDate %>" Value="4"></asp:ListItem>                                            
            </asp:DropDownList>
        </td>
        </tr>
        <tr>
        <td>
            <asp:Label ID="ChooseNumberOfPeriods" runat="server" Text="<%$Dict:DataFlowReport.ChooseNumberOfPeriods %>"></asp:Label>
        </td>
        <td>
            <asp:DropDownList ID="NumPeriodsDDL" runat="server">
                <asp:ListItem Text="<%$Dict:DataFlowReport.OnePeriod %>" Value="1"></asp:ListItem>
                <asp:ListItem Text="<%$Dict:DataFlowReport.TwoPeriods %>" Value="2"></asp:ListItem>
                <asp:ListItem Text="<%$Dict:DataFlowReport.ThreePeriods %>" Value="3"></asp:ListItem>
                <asp:ListItem Text="<%$Dict:DataFlowReport.FourPeriods %>"     Value="4"></asp:ListItem>
            </asp:DropDownList>
            <asp:Button ID="SetNumberOfPeriods" runat="server" Text="<%$ Dict:clientAddWoFile.csvFieldInTemplate%>" 
             OnClick="SetNumberPfPeriods" CausesValidation="false"/>
            <asp:HiddenField ID="NumPeriodsHiddenField" runat="server" Value="1" />             
        </td>
        
        </tr>
        <tr>
        <td>
            <asp:Label ID="DateFromTitleLabel" runat="server" Text='<%$Dict:reportsParams.Between %>'></asp:Label>
        </td>
        <td>
            <KBMControls:KBMReadOnlyTxtBox runat="server" ID="txtFromDate"></KBMControls:KBMReadOnlyTxtBox>
            <KBMValidators:requiredValidator ID="RequiredValidator1" runat="server" ControlToValidate="txtFromDate" ErrorMessage='<%$Dict:reportsParams.MustChooseBetweenTime %>'>
            </KBMValidators:requiredValidator>
            <KBMControls:KbmCalendar TargetControlID="txtFromDate" runat="server" ID="KbmCalendar11">
            </KBMControls:KbmCalendar>
        </td>
        
        <td>
            <asp:Label ID="DateTillTitleLabel"  runat="server"  Text='<%$Dict:reportsParams.And %>'></asp:Label>
        </td>
        <td>
            <KBMControls:KBMReadOnlyTxtBox runat="server" ID="txtToDate"></KBMControls:KBMReadOnlyTxtBox>
            <%--<KBMValidators:BiggerThenEqualDateValidator ID="BiggerThenEqualDateValidator1" Display="None"
                errorMessage='<%$Dict:reportsParams.ToDateSmallerThenFromDate %>' ControlToCompare="txtFromDate"
                ControlToValidate="txtToDate" runat="server"></KBMValidators:BiggerThenEqualDateValidator>--%>
            <KBMValidators:requiredValidator ID="RequiredValidator2" ControlToValidate="txtToDate" ErrorMessage='<%$Dict:reportsParams.MustChooseToDate %>'
                runat="server"></KBMValidators:requiredValidator>
            <KBMControls:KbmCalendar TargetControlID="txtToDate" runat="server" ID="KbmCalendar12">
            </KBMControls:KbmCalendar>
        </td>
        <td>
            
            <asp:DropDownList ID="QSetter1" runat="server">
                <asp:ListItem Text="" Value="0"></asp:ListItem>
                <asp:ListItem Text="Q1" Value="1"></asp:ListItem>
                <asp:ListItem Text="Q2" Value="2"></asp:ListItem>
                <asp:ListItem Text="Q3" Value="3"></asp:ListItem>
                <asp:ListItem Text="Q4" Value="4"></asp:ListItem>
            </asp:DropDownList>
            <asp:DropDownList ID="YSetter1" runat="server">
                <asp:ListItem Text="" Value="0"></asp:ListItem>
                <asp:ListItem Text="2012" Value="2012"></asp:ListItem>
                <asp:ListItem Text="2013" Value="2013"></asp:ListItem>
                <asp:ListItem Text="2014" Value="2014"></asp:ListItem>
                <asp:ListItem Text="2015" Value="2015"></asp:ListItem>                
            </asp:DropDownList>
            <asp:Button ID="Time1Set" runat="server" Text='<%$Dict:clientAddWoFile.csvFieldInTemplate %>'
             OnClick="SetQY1" CausesValidation="false"/>
        </td>
        </tr>
        <tr>
        <td>
            <asp:Panel ID="Set2Panel1" runat="server">
                <asp:Label ID="DateFromAndLabel"  runat="server"  Text='<%$Dict:reportsParams.And %>'></asp:Label>
                <asp:Label ID="DateFromLabel2" runat="server" Text='<%$Dict:reportsParams.Between %>'></asp:Label>
            </asp:Panel>   
            
        </td>
        <td>
            <asp:Panel ID="Set2Panel2" runat="server" Visible="false">
                <KBMControls:KBMReadOnlyTxtBox runat="server" ID="txtFromDate2"></KBMControls:KBMReadOnlyTxtBox>
                <KBMControls:KbmCalendar TargetControlID="txtFromDate2" runat="server" ID="KbmCalendar21">
                </KBMControls:KbmCalendar>
            </asp:Panel>
            
        </td>
        <td>
            <asp:Panel ID="Set2Panel3" runat="server" Visible="false">
                <asp:Label ID="DateTillTitleLabel2"  runat="server"  Text='<%$ Dict:reportsParams.And %>'></asp:Label>
            </asp:Panel>
            
        </td>
        <td>
            <asp:Panel ID="Set2Panel4" runat="server">
                <KBMControls:KBMReadOnlyTxtBox runat="server" ID="txtToDate2"></KBMControls:KBMReadOnlyTxtBox>
                <KBMControls:KbmCalendar TargetControlID="txtToDate2" runat="server" ID="KbmCalendar22"></KBMControls:KbmCalendar>            
            </asp:Panel>
        </td>
        <td>
            <asp:Panel ID="Set2Panel5" runat="server" >
                <asp:DropDownList ID="QSetter2" runat="server">
                    <asp:ListItem Text="" Value="0"></asp:ListItem>
                    <asp:ListItem Text="Q1" Value="1"></asp:ListItem>
                    <asp:ListItem Text="Q2" Value="2"></asp:ListItem>
                    <asp:ListItem Text="Q3" Value="3"></asp:ListItem>
                    <asp:ListItem Text="Q4" Value="4"></asp:ListItem>
                </asp:DropDownList>
                <asp:DropDownList ID="YSetter2" runat="server">
                    <asp:ListItem Text="" Value="0"></asp:ListItem>
                    <asp:ListItem Text="2012" Value="2012"></asp:ListItem>
                    <asp:ListItem Text="2013" Value="2013"></asp:ListItem>
                    <asp:ListItem Text="2014" Value="2014"></asp:ListItem>
                    <asp:ListItem Text="2015" Value="2015"></asp:ListItem>                
                </asp:DropDownList>
                <asp:Button ID="Time2Set" runat="server" Text='<%$Dict:clientAddWoFile.csvFieldInTemplate %>'
                 OnClick="SetQY2" CausesValidation="false"/>
            </asp:Panel>             
        </td>
        </tr>
        <td>
            <asp:Panel ID="Set3Panel1" runat="server">
                <asp:Label ID="DateFromAndLabel3"  runat="server"  Text='<%$Dict:reportsParams.And %>'></asp:Label>
                <asp:Label ID="DateFromLabel3" runat="server" Text='<%$Dict:reportsParams.Between %>'></asp:Label>
            </asp:Panel>   
            
        </td>
        <td>
            <asp:Panel ID="Set3Panel2" runat="server" Visible="false">
                <KBMControls:KBMReadOnlyTxtBox runat="server" ID="txtFromDate3"></KBMControls:KBMReadOnlyTxtBox>
                <KBMControls:KbmCalendar TargetControlID="txtFromDate3" runat="server" ID="KbmCalendar31">
                </KBMControls:KbmCalendar>
            </asp:Panel>
            
        </td>
        <td>
            <asp:Panel ID="Set3Panel3" runat="server" Visible="false">
                <asp:Label ID="DateTillTitleLabel3"  runat="server"  Text='<%$ Dict:reportsParams.And %>'></asp:Label>
            </asp:Panel>
            
        </td>
        <td>
            <asp:Panel ID="Set3Panel4" runat="server">
                <KBMControls:KBMReadOnlyTxtBox runat="server" ID="txtToDate3"></KBMControls:KBMReadOnlyTxtBox>
                <KBMControls:KbmCalendar TargetControlID="txtToDate3" runat="server" ID="KbmCalendar32"></KBMControls:KbmCalendar>            
            </asp:Panel>
        </td>
        <td>
            <asp:Panel ID="Set3Panel5" runat="server" >
                <asp:DropDownList ID="QSetter3" runat="server">
                    <asp:ListItem Text="" Value="0"></asp:ListItem>
                    <asp:ListItem Text="Q1" Value="1"></asp:ListItem>
                    <asp:ListItem Text="Q2" Value="2"></asp:ListItem>
                    <asp:ListItem Text="Q3" Value="3"></asp:ListItem>
                    <asp:ListItem Text="Q4" Value="4"></asp:ListItem>
                </asp:DropDownList>
                <asp:DropDownList ID="YSetter3" runat="server">
                    <asp:ListItem Text="" Value="0"></asp:ListItem>
                    <asp:ListItem Text="2012" Value="2012"></asp:ListItem>
                    <asp:ListItem Text="2013" Value="2013"></asp:ListItem>
                    <asp:ListItem Text="2014" Value="2014"></asp:ListItem>
                    <asp:ListItem Text="2015" Value="2015"></asp:ListItem>                
                </asp:DropDownList>
                <asp:Button ID="Time3Set" runat="server" Text='<%$Dict:clientAddWoFile.csvFieldInTemplate %>'
                 OnClick="SetQY3" CausesValidation="false"/>
            </asp:Panel>             
        </td>
        <tr>
        <td>
            <asp:Panel ID="Set4Panel1" runat="server">
                <asp:Label ID="DateFromAndLabel4"  runat="server"  Text='<%$Dict:reportsParams.And %>'></asp:Label>
                <asp:Label ID="DateFromLabel4" runat="server" Text='<%$Dict:reportsParams.Between %>'></asp:Label>
            </asp:Panel>   
            
        </td>
        <td>
            <asp:Panel ID="Set4Panel2" runat="server" Visible="false">
                <KBMControls:KBMReadOnlyTxtBox runat="server" ID="txtFromDate4"></KBMControls:KBMReadOnlyTxtBox>
                <KBMControls:KbmCalendar TargetControlID="txtFromDate4" runat="server" ID="KbmCalendar41">
                </KBMControls:KbmCalendar>
            </asp:Panel>
            
        </td>
        <td>
            <asp:Panel ID="Set4Panel3" runat="server" Visible="false">
                <asp:Label ID="DateTillTitleLabel4"  runat="server"  Text='<%$ Dict:reportsParams.And %>'></asp:Label>
            </asp:Panel>
            
        </td>
        <td>
            <asp:Panel ID="Set4Panel4" runat="server">
                <KBMControls:KBMReadOnlyTxtBox runat="server" ID="txtToDate4"></KBMControls:KBMReadOnlyTxtBox>
                <KBMControls:KbmCalendar TargetControlID="txtToDate4" runat="server" ID="KbmCalendar42"></KBMControls:KbmCalendar>            
            </asp:Panel>
        </td>
        <td>
            <asp:Panel ID="Set4Panel5" runat="server" >
                <asp:DropDownList ID="QSetter4" runat="server">
                    <asp:ListItem Text="" Value="0"></asp:ListItem>
                    <asp:ListItem Text="Q1" Value="1"></asp:ListItem>
                    <asp:ListItem Text="Q2" Value="2"></asp:ListItem>
                    <asp:ListItem Text="Q3" Value="3"></asp:ListItem>
                    <asp:ListItem Text="Q4" Value="4"></asp:ListItem>
                </asp:DropDownList>
                <asp:DropDownList ID="YSetter4" runat="server">
                    <asp:ListItem Text="" Value="0"></asp:ListItem>
                    <asp:ListItem Text="2012" Value="2012"></asp:ListItem>
                    <asp:ListItem Text="2013" Value="2013"></asp:ListItem>
                    <asp:ListItem Text="2014" Value="2014"></asp:ListItem>
                    <asp:ListItem Text="2015" Value="2015"></asp:ListItem>                
                </asp:DropDownList>
                <asp:Button ID="Time4Set" runat="server" Text='<%$Dict:clientAddWoFile.csvFieldInTemplate %>'
                 OnClick="SetQY4" CausesValidation="false"/>
            </asp:Panel>             
        </td>
        </tr>
        
        
        <tr>
        <td>
            <asp:Label ID="MaxDaysTitleLabel" runat="server" Text="<%$ Dict:DataFlowReport.MaxDaysTitle %>"></asp:Label>
        </td>
        <td>
            <asp:DropDownList ID="MaxDaysDDL" runat="server">
                <asp:ListItem Text="5" Value="5"></asp:ListItem>
                <asp:ListItem Text="10" Value="10"></asp:ListItem>
                <asp:ListItem Text="15" Value="15"></asp:ListItem>
                <asp:ListItem Text="20" Value="20" Selected="True"></asp:ListItem>
                <asp:ListItem Text="25" Value="25"></asp:ListItem>
                <asp:ListItem Text="30" Value="30"></asp:ListItem>
                <asp:ListItem Text="35" Value="35"></asp:ListItem>
                <asp:ListItem Text="40" Value="40"></asp:ListItem>
                <asp:ListItem Text="45" Value="45"></asp:ListItem>
                <asp:ListItem Text="50" Value="50"></asp:ListItem>
            </asp:DropDownList>
        </td>
        <td>
            <asp:Label ID="StepTitleLabel" runat="server" Text="<%$ Dict:DataFlowReport.StepTitle %>" ></asp:Label>
        </td>
        <td>
            <asp:DropDownList ID="StepDDL" runat="server">
                <asp:ListItem Value="1" Text="1"></asp:ListItem>
                <asp:ListItem Value="2" Text="2"></asp:ListItem>
                <asp:ListItem Value="3" Text="3"></asp:ListItem>
                <asp:ListItem Value="4" Text="4"></asp:ListItem>
                <asp:ListItem Value="5" Text="5" Selected="True"></asp:ListItem>
                <asp:ListItem Value="6" Text="6"></asp:ListItem>
                <asp:ListItem Value="7" Text="7"></asp:ListItem>
                <asp:ListItem Value="8" Text="8"></asp:ListItem>
                <asp:ListItem Value="9" Text="9"></asp:ListItem>
                <asp:ListItem Value="10" Text="10"></asp:ListItem>
            </asp:DropDownList>
        </td>
        </tr>
        <tr>
        <td>
            <asp:Label ID="TextATitle" runat="server" Text="<%$ Dict:clientAddWo.TextFieldA %>"></asp:Label>
        </td>
        <td colspan="3">
            <asp:TextBox ID="TextFieldABox" runat="server" Width="200" TextMode="SingleLine" MaxLength="100"></asp:TextBox>
        </td>
        </tr>
        <tr>
        <td>
            <asp:Label ID="TextCTitle" runat="server" Text="<%$ Dict:clientAddWo.TextFieldC %>"></asp:Label>
        </td>
        <td colspan="3">
            <asp:TextBox ID="TextFieldCBox" runat="server" Width="200" TextMode="SingleLine" MaxLength="100"></asp:TextBox>
        </td>
        </tr>
        <tr>
        <td colspan="4" style="text-align:right;  direction:rtl;">
            <asp:Panel Direction="RightToLeft" runat="server">
                <asp:RadioButtonList ID="StageRBL" runat="server">
                    <asp:ListItem Text="ממתין לSCD (רכש) להזמנת אפס" Value="1"></asp:ListItem>
                    <asp:ListItem Text="ממתין לריקור להצעת מחיר" Value="2"></asp:ListItem>
                    <asp:ListItem Text="ממתין לאישור שירות לקוחות בSCD" Value="3"></asp:ListItem>
                    <asp:ListItem Text="ממתין להכנסת הזמנה בכסף של SCD." Value="4"></asp:ListItem>
                    <asp:ListItem Text="מאושרים בתהליך" Value="9"></asp:ListItem>
                    <asp:ListItem Text="מתחילת התהליך ועד סופו" Value="5"></asp:ListItem>
                </asp:RadioButtonList>                  
            </asp:Panel>
            <asp:RequiredFieldValidator ID="StageRequired" runat="server" ControlToValidate="StageRBL" Text="Failed - Value Required"></asp:RequiredFieldValidator>
        </td>
        </tr>
        <tr>
        <td>
        <asp:Button ID="GenerateReportButton" runat="server" Text="<%$ Dict:Reports.GenerateReport %>" OnClick="GenerateReport"
         CausesValidation="true" />  
        </td>
        <td colspan="3">                
            <asp:UpdateProgress ID="Progress" runat="server" AssociatedUpdatePanelID="UpdatePanel1">
                <ProgressTemplate>
                    <asp:Image ID="ProgressImage" runat="server" ImageUrl="~/Images/ajax-loaderBar.gif" />
                </ProgressTemplate>
            </asp:UpdateProgress>          
        </td>
        </tr>
        </table>
        <asp:Label ID="DBG" runat="server"></asp:Label>
        <br /><hr /><br />
        
        <asp:Chart ID="DataFlowChart" runat="server" Width="1250" Height="400" ImageLocation="~/Images/ChartsJunk" 
            ImageStorageMode="UseImageLocation" ImageType="Png" Visible="false">
            <Titles>
                <asp:Title Name="Title1" Text="<%$Dict:DataFlowReport.Title %>" Alignment="TopLeft" Font="Arial, 12px, style=Bold"></asp:Title>
            </Titles>
            <Legends>
                <asp:Legend IsTextAutoFit="true" Name="Default" Font="Arial, 12px, style=Bold" 
                Docking="Right"  LegendItemOrder="ReversedSeriesOrder" ></asp:Legend>                
            </Legends>
            <Series>
                <asp:Series Name="S0" ChartType="StackedColumn" IsValueShownAsLabel="true" Color="#00A2E8" ></asp:Series>                
                <asp:Series Name="S1" ChartType="StackedColumn" IsValueShownAsLabel="true" Color="#FFF200"  ></asp:Series>
                <asp:Series Name="S2" ChartType="StackedColumn" IsValueShownAsLabel="true"  Color="#A349A4"></asp:Series>                
                <asp:Series Name="S3" ChartType="StackedColumn" IsValueShownAsLabel="true" Color="#FFAEC9" ></asp:Series>                
                <asp:Series Name="S4" ChartType="StackedColumn" IsValueShownAsLabel="true"  Color="#B97A57"></asp:Series>                
                <asp:Series Name="S5" ChartType="StackedColumn" IsValueShownAsLabel="true" Color="#FFC90E" ></asp:Series>
                <asp:Series Name="S6" ChartType="StackedColumn" IsValueShownAsLabel="true"  Color="#22B14C"></asp:Series>                
                <asp:Series Name="S7" ChartType="StackedColumn" IsValueShownAsLabel="true" Color="#C8BFE7" ></asp:Series>
            </Series>
            <ChartAreas>
                <asp:ChartArea  Name="ChartArea1" BorderColor="64, 64, 64, 64" BorderDashStyle="Solid" BackSecondaryColor="White" 
                BackColor="Gainsboro" ShadowColor="Transparent" BackGradientStyle="TopBottom" >
                    <area3dstyle Rotation="10" perspective="10" Inclination="15" IsRightAngleAxes="False" wallwidth="0" IsClustered="False"></area3dstyle>
					<axisy linecolor="64, 64, 64, 64" IsLabelAutoFit="False" Interval="Auto">
						<labelstyle font="Arial, 8.25pt, style=Bold" />
						<majorgrid linecolor="64, 64, 64, 64" />
					</axisy>
					<axisx linecolor="64, 64, 64, 64" IsLabelAutoFit="False">
						<labelstyle font="Arial, 8.25pt, style=Bold" IsStaggered="True" />
						<majorgrid linecolor="64, 64, 64, 64" />
                        <%--<CustomLabels>
                            <asp:CustomLabel Text="<%$ Resources:Resource, OpponentAnalyze_GoalKeepersAxisXTitle %>" FromPosition="0.5" ToPosition="1.5" />
                            <asp:CustomLabel Text="<%$ Resources:Resource, OpponentAnalyze_DefenceAxisXTitle %>" FromPosition="1.5" ToPosition="2.5" />
                            <asp:CustomLabel Text="<%$ Resources:Resource, OpponentAnalyze_MidfieldAxisXTitle %>" FromPosition="2.5" ToPosition="3.5" />
                            <asp:CustomLabel Text="<%$ Resources:Resource, OpponentAnalyze_AttackAxisXTitle %>" FromPosition="3.5" ToPosition="4.5" />
                        </CustomLabels>--%>
					</axisx>                    
				</asp:ChartArea>
            </ChartAreas>
        </asp:Chart> 
    </ContentTemplate>
    </asp:UpdatePanel>    
    </asp:Panel>    
    </div>
    </form>
</body>
</html>
